package fr.gestproj.bean.referentiel;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;

import fr.gestproj.commun.datamodel.DatamodelProfil;
import fr.gestproj.facade.ProfilFacade;
import fr.gestproj.model.Profil;
import fr.gestproj.model.dto.DTOColumnModel;

@Named
@ViewScoped
public class BeanReferentielProfil extends AbstractBeanReferentiel<Profil, ProfilFacade, DatamodelProfil> implements Serializable {

	@Inject
	private ProfilFacade profilFacade;

	public BeanReferentielProfil() {
	}

	@PostConstruct
	private void init() {
		super.init(profilFacade, Profil.class, DatamodelProfil.class);
	}

	@Override
	public List<DTOColumnModel> getDatatableColumns() {
		List<DTOColumnModel> liste = new ArrayList<DTOColumnModel>();
		liste.add(new DTOColumnModel("Libellé", "libelle", true, true, String.class));
		liste.add(new DTOColumnModel("Controle total", "controleTotal", true, true, Boolean.class));
		return liste;
	}
}
